The menu is clearly associated with a particular window, so keeping
it around when the window is gone doesn't make sense - in case of
the window menu, it is actually harmful as every action will act on
the invalidated window and result in a crash. So just dismiss the
menu when the menu is unmanaged.
https://bugzilla.gnome.org/show_bug.cgi?id=749529
menu.connect('activate', function() {
window.check_alive(global.get_current_time());
});
+ let destroyId = window.connect('unmanaged',
+ function() {
+ menu.close();
+ });
this._sourceActor.set_size(rect.width, rect.height);
this._sourceActor.set_position(rect.x, rect.y);
this._sourceActor.hide();
menu.destroy();
+ window.disconnect(destroyId);
}));
}
});